﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SharedLib.WinFormMVCFramework.ExceptionHandling
{
    /// <summary>
    /// Display error message in textbox so that user can copy them easily
    /// </summary>
    public partial class ExceptionForm : Form
    {
        public ExceptionForm()
        {
            InitializeComponent();
        }

        public static void Show(string message, string title)
        {
            ExceptionForm form = new ExceptionForm();
            form.textBoxMessage.Text = message;
            form.Text = title;
            form.ShowDialog();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            Close();
        }

    }
}
